<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Maintain extends BaseModel
{
    //维修库
    use HasFactory;
    protected $table = 'maintain';
    // 允许批量操作的字段
    protected $fillable = ['order_id','semi_id','remark','created_at','updated_at'];
    public function scopeSearch($query,$params)
    {
        return $query;
    }

    public function semi(){
        return $this->hasOne(SemiFinishProduct::class,'id','semi_id');
    }

}
